import { ref, computed } from "vue"

type PmStatus = 'delete' | 'running' | 'done' | undefined

function useCheckPmStatus() {
  /**绩效状态 */
  let pmStatus = ref<PmStatus>(undefined)

  /**绩效状态变化 */
  const changePmStatus = (status: PmStatus) => {
    pmStatus.value = status
  }

  /**获取绩效状态 */
  const getPmStatus = computed(() => pmStatus.value)

  /**根据pmId查询当前绩效状态 */
  const checkPmStatus = ({pmId}: {pmId: number}) => {}

  return {
    pmStatus: getPmStatus,
    checkPmStatus
  }
}

export default useCheckPmStatus
